package threaddemo15;

import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;

/**
 * Created by L.jp
 * Description:
 * User: 86189
 * Date: 2022-08-07
 * Time: 17:30
 */
//演示阻塞队列的基本使用
public class Demo {
    public static void main(String[] args) throws InterruptedException {
        ArrayBlockingQueue<String> aq=new ArrayBlockingQueue<String>(1);
        
        aq.put("包子");
        System.out.println(aq.take());
        System.out.println("程序结束");
    }
}
